// 自动生成模板UserOrderDetail
package model

import (
	"gin-vue-admin/global"
)

// 如果含有time.Time 请自行import time包
type UserOrderDetail struct {
      global.GVA_MODEL
      Brand  string `json:"brand" form:"brand" gorm:"column:brand;comment:品牌或厂家;type:varchar(255);"`
      BuyId  int `json:"buyId" form:"buyId" gorm:"column:buy_id;comment:;type:int;size:10;"`
      BuyNumber  float64 `json:"buyNumber" form:"buyNumber" gorm:"column:buy_number;comment:采购量;type:decimal;size:10,2;"`
      CProduct  int `json:"cProduct" form:"cProduct" gorm:"column:c_product;comment:品类名;type:int;size:10;"`
      CWork  int `json:"cWork" form:"cWork" gorm:"column:c_work;comment:行业;type:int;size:10;"`
      Name  string `json:"name" form:"name" gorm:"column:name;comment:商品名称;type:varchar(255);"`
      Norms  string `json:"norms" form:"norms" gorm:"column:norms;comment:规格或型号;type:varchar(255);"`
      OrderId  int `json:"orderId" form:"orderId" gorm:"column:order_id;comment:订单编号;type:int;size:10;"`
      PerPrice  float64 `json:"perPrice" form:"perPrice" gorm:"column:per_price;comment:单价（元）;type:decimal;size:10,2;"`
      SellerId  int `json:"sellerId" form:"sellerId" gorm:"column:seller_id;comment:;type:int;size:10;"`
      Unit  string `json:"unit" form:"unit" gorm:"column:unit;comment:单位;type:varchar(255);"`
      CWorkInfo CTypes  `json:"c_work_info"  gorm:"foreignKey:ID;references:CWork"`
      CProductInfo CTypes  `json:"c_product_info" gorm:"foreignKey:ID;references:CProduct"`
      UserOrder UserOrder   `json:"user_order" gorm:"foreignKey:ID;references:OrderId"`
      BuyUsers Users `json:"buy_user" gorm:"foreignKey:ID;references:BuyId"`
      SellerUser Users `json:"seller_user"  gorm:"foreignKey:ID;references:SellerId"`
}


func (UserOrderDetail) TableName() string {
  return "user_order_detail"
}

